<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class ContractTenant extends Model
{
    use HasFactory;

    public $table = 'contract_tenant';

    public $guarded = [];

    public static function hasDuplicateIdNo($array, $key) {
        $idNoArray = array_column($array, $key);
        return count($idNoArray) !== count(array_unique($idNoArray));
    }
}
